<!-- inc:head -->
<div class="notice">
&raquo; 编辑分类
<input type="button" value="分类列表" onclick="tourl('admin.php?file=category&act=list')">
</div>

<div style="height:2px;"><div></div></div>
<div class="none">
<form method="post" action="admin.php?file=category&act=modifyok&id={:$id}" onsubmit="return chk();">
</div>

<div class="table" onmouseover="this.className='table table1'" onmouseout="this.className='table'">
	<div class="left">分类名称：<span style="color:red;">*</span></div>
	<div class="right">
		<input type="text" name="catename" id="catename" value="{:$rs[catename]}" style="{:$rs[catestyle]}">
	</div>
	<div class="clear"></div>
</div>

<div class="table" onmouseover="this.className='table table1'" onmouseout="this.className='table'">
	<div class="left">样式：</div>
	<div class="right">
		<input type="text" name="catestyle" id="catestyle" class="long_input" value="{:$rs[catestyle]}">
		<img src="images/style.gif" title="主题样式" style="cursor:pointer;" align="absmiddle" onclick="subject_css(this)">
		<span class="clue_on">[不熟悉请留空]</span>
	</div>
	<div class="clear"></div>
</div>

<div class="table">
	<div class="left">上级分类：</div>
	<div class="right">
		<select name="cateid" id="cateid">
		<option value="0">设为根分类</option>
		<!-- $catelist AS $key=>$value -->
		<option value="{:$value[id]}"{if($value[id] == $rs[parentid])} selected{end}>{:$value[space]}{:$value[catename]}</option>
		<!-- end -->
		</select>
		<span class="clue_on">[分类建议不要超过三级]</span>
	</div>
	<div class="clear"></div>
</div>

<div class="table" onmouseover="this.className='table table1'" onmouseout="this.className='table'">
	<div class="left">封面模板：</div>
	<div class="right">
		<input type="text" name="tpl_index" id="tpl_index" value="{:$rs[tpl_index]}">
		<span class="clue_on" style="color:red;">[如果您要启用封面功能，请设置好封面模板]</span>
	</div>
	<div class="clear"></div>
</div>

<div class="table" onmouseover="this.className='table table1'" onmouseout="this.className='table'">
	<div class="left">列表模板：</div>
	<div class="right">
		<input type="text" name="tpl_list" id="tpl_list" value="{:$rs[tpl_list]}">
		<span class="clue_on">[在不使用封面模板情况下可为空，使用系统默认，也可以自定义]</span>
	</div>
	<div class="clear"></div>
</div>

<div class="table" onmouseover="this.className='table table1'" onmouseout="this.className='table'">
	<div class="left">内容模板：</div>
	<div class="right">
		<input type="text" name="tpl_msg" id="tpl_msg" value="{:$rs[tpl_msg]}">
		<span class="clue_on">[为空使用系统默认，设定后如果内容里没有单独设置，则使用该设置]</span>
	</div>
	<div class="clear"></div>
</div>

<div class="table" onmouseover="this.className='table table1'" onmouseout="this.className='table'">
	<div class="left">状态：</div>
	<div class="right">
		<input type="checkbox" name="ifcheck" id="ifcheck"{if($rs[ifcheck])} checked{end}> <span class="clue_on">[暂停该分类的使用，请将打勾去掉，反之请打上勾]</span>
	</div>
	<div class="clear"></div>
</div>

<div class="table" onmouseover="this.className='table table1'" onmouseout="this.className='table'">
	<div class="left">排序：</div>
	<div class="right">
		<input type="text" name="taxis" id="taxis" class="short_input" value="{:$rs[taxis]}">
		<span class="clue_on">[最越小越往前靠，不能超过255]</span>
	</div>
	<div class="clear"></div>
</div>

<div class="table" onmouseover="this.className='table table1'" onmouseout="this.className='table'">
	<div class="left">每页显示数量：</div>
	<div class="right">
		<input type="text" name="psize" id="psize" class="short_input" value="{:$rs[psize]}">
		<span class="clue_on">[不能超过255]</span>
	</div>
	<div class="clear"></div>
</div>

<div class="table">
	<div class="left">SEO 关键字：</div>
	<div class="right">
		<input class="long_input" name="keywords" id="keywords" value="{:$rs[keywords]}">
		<span class="clue_on">[多个关键字用英文逗号隔开，不要超过100个汉字]</span>
	</div>
	<div class="clear"></div>
</div>

<div class="table">
	<div class="left">SEO 描述：</div>
	<div class="right">
		<input class="long_input" name="description" id="description" value="{:$rs[description]}">
		<span class="clue_on">[简要描述当前分类主要的功能，不要超过100个汉字]</span>
	</div>
	<div class="clear"></div>
</div>

<div class="table">
	<div class="left">描述：</div>
	<div class="right">
		<textarea class="long_input" name="note" id="note">{:$rs[note]}</textarea>
		<span class="clue_on">[不要超过100个汉字]</span>
	</div>
	<div class="clear"></div>
</div>

<br /><br />
<div class="table">
	<div class="left"></div>
	<div class="right"><input type="submit" id="cate_submit" name="cate_submit" value="更新分类"></div>
	<div class="clear"></div>
</div>

</form>

<script type="text/javascript">
function subject_css(v)
{
	var vLeft = getLeft(v);
	var vTop = getTop(v);
	Layer.init('admin.php?file=open&act=style&inputname=style&subject_input=catename',375,170,vLeft,vTop);
}
function chk()
{
	var catename = $("catename").value;
	if(!catename)
	{
		alert("分类名称不能为空");
		return false;
	}
	var cateid = $("cateid").value;
	if(!cateid || cateid == "0")
	{
		var q = confirm("确定要设置为根分类吗？点“确定”继续，点“取消”返回修改");
		if(q == "0")
		{
			return false;
		}
	}
	$("cate_submit").disabled = true;
}

</script>


<!-- inc:foot -->